The JOIN condition was being ignored because there is no table called "user_group" in MediaWiki core.
Thus if and when using $wgSharedDB, the query would end up listing *all* registered users from the shared user table.
And even without $wgSharedDB, running rebuildrecentchanges.php would result in everyone's edits being marked as bot edits (recentchanges.rc_bot = 1) and thus hidden from the Special:RecentChanges page.
Thanks to Lcawte for reporting this bug.
Follow-up to
27c61fb1e94da9114314468fd00bcf129ec064b6
Change-Id: I18d658b67c50f2200341f732783c2e7524dd27f1
[ 'ug_group' => $botgroups ],
__METHOD__,
[ 'DISTINCT' ],
- [ 'user_group' => [ 'JOIN', 'user_id = ug_user' ] ] + $userQuery['joins']
+ [ 'user_groups' => [ 'JOIN', 'user_id = ug_user' ] ] + $userQuery['joins']
);
$botusers = [];